import React from "react";
import { Button } from "antd";
import { DownOutlined } from "@ant-design/icons";
import QueueAnim from "rc-queue-anim";
import TweenOne from "rc-tween-one";
import { isImg } from "../../utils";

const Banner = (props: any) => {
  const { ...currentProps } = props;
  const { dataSource } = currentProps;
  return (
    <div {...currentProps} {...dataSource.wrapper}>
      <QueueAnim
        key="QueueAnim"
        type={["bottom", "top"]}
        delay={200}
        {...dataSource.textWrapper}
      >
        <div key="title" {...dataSource.title}>
          <img src={dataSource.title.children} width="100%" alt="img" />
        </div>
        <div key="content" {...dataSource.content}>
          {dataSource.content.children}
        </div>
      </QueueAnim>
    </div>
  );
};

export default Banner;
